<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  
  <link rel="shortcut icon" href="../../img/favicon.ico">
  <title>Troubleshooting - Forge Networking Remastered</title>
  <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>

  <link rel="stylesheet" href="../../css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../css/theme_extra.css" type="text/css" />
  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
  
  <script>
    // Current page data
    var mkdocs_page_name = "Troubleshooting";
    var mkdocs_page_input_path = "Troubleshooting/troubleshooting.md";
    var mkdocs_page_url = null;
  </script>
  
  <script src="../../js/jquery-2.1.1.min.js" defer></script>
  <script src="../../js/modernizr-2.8.3.min.js" defer></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
  <script>hljs.initHighlightingOnLoad();</script> 
  
</head>

<body class="wy-body-for-nav" role="document">

  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
      <div class="wy-side-nav-search">
        <a href="../.." class="icon icon-home"> Forge Networking Remastered</a>
        <div role="search">
  <form id ="rtd-search-form" class="wy-form" action="../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" title="Type search term here" />
  </form>
</div>
      </div>

      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
	<ul class="current">
	  
          
            <li class="toctree-l1">
		
    <span class="caption-text">Home</span>
    <ul class="subnav">
                <li class="">
                    
    <a class="" href="../..">User Manual (Forge Networking Remastered)</a>
                </li>
                <li class="">
                    
    <a class="" href="../../authoritative-design/">Authoritative Design</a>
                </li>
    </ul>
	    </li>
          
            <li class="toctree-l1">
		
    <span class="caption-text">Getting Started</span>
    <ul class="subnav">
                <li class="">
                    
    <a class="" href="../../GettingStarted/getting-started/">Getting Started</a>
                </li>
                <li class="">
                    
    <a class="" href="../../GettingStarted/basic-moving-cube-example/">Basic Moving Cube Example</a>
                </li>
                <li class="">
                    
    <a class="" href="../../GettingStarted/basic-rpc-example/">Basic RPC Example</a>
                </li>
                <li class="">
                    
    <a class="" href="../../GettingStarted/basic-instantiation-example/">Basic Instantiation Example</a>
                </li>
                <li class="">
                    
    <a class="" href="../../GettingStarted/jump-start-guide/">Jump Start Guide</a>
                </li>
    </ul>
	    </li>
          
            <li class="toctree-l1">
		
    <span class="caption-text">Network Contract Wizard (NCW)</span>
    <ul class="subnav">
                <li class="">
                    
    <a class="" href="../../NetworkContractWizard/network-contract-wizard-ncw/">Network Contract Wizard (NCW)</a>
                </li>
                <li class="">
                    
    <a class="" href="../../NetworkContractWizard/extending-generated-classes/">Extending Generated Classes</a>
                </li>
                <li class="">
                    
    <a class="" href="../../NetworkContractWizard/name-collision-issues/">Name Collision Issues</a>
                </li>
    </ul>
	    </li>
          
            <li class="toctree-l1">
		
    <span class="caption-text">Network Object</span>
    <ul class="subnav">
                <li class="">
                    
    <a class="" href="../../NetworkObject/changing-ownership/">Changing Ownership</a>
                </li>
                <li class="">
                    
    <a class="" href="../../NetworkObject/destroying-the-network-object/">Destroying the Network Object</a>
                </li>
                <li class="">
                    
    <a class="" href="../../NetworkObject/fields/">Fields</a>
                </li>
                <li class="">
                    
    <span class="caption-text">Remote Procedure Calls (RPCs)</span>
    <ul class="subnav">
                <li class="toctree-l3">
                    
    <a class="" href="../../NetworkObject/RemoteProcedureCalls/remote-procedure-calls/">Remote Procedure Calls</a>
                </li>
                <li class="toctree-l3">
                    
    <a class="" href="../../NetworkObject/RemoteProcedureCalls/buffered-rpcs/">Buffered RPCs</a>
                </li>
                <li class="toctree-l3">
                    
    <a class="" href="../../NetworkObject/RemoteProcedureCalls/sending-rpc-to-a-single-player/">Sending RPC to a Single Player</a>
                </li>
                <li class="toctree-l3">
                    
    <a class="" href="../../NetworkObject/RemoteProcedureCalls/rpcargs-and-rpcinfo-structs/">RpcArgs and RpcInfo Structs</a>
                </li>
                <li class="toctree-l3">
                    
    <a class="" href="../../NetworkObject/RemoteProcedureCalls/rpc-validation-by-server/">RPC Validation by Server</a>
                </li>
                <li class="toctree-l3">
                    
    <a class="" href="../../NetworkObject/RemoteProcedureCalls/replacing-previous-buffered-rpcs/">Replacing Previous Buffered RPCs</a>
                </li>
                <li class="toctree-l3">
                    
    <a class="" href="../../NetworkObject/RemoteProcedureCalls/clearing-buffered-rpcs/">Clearing Buffered RPCs</a>
                </li>
    </ul>
                </li>
    </ul>
	    </li>
          
            <li class="toctree-l1">
		
    <span class="caption-text">Unity Integration</span>
    <ul class="subnav">
                <li class="">
                    
    <a class="" href="../../UnityIntegration/gameobject-execution-order/">GameObject Execution Order</a>
                </li>
                <li class="">
                    
    <a class="" href="../../UnityIntegration/network-instantiation/">Network Instantiation</a>
                </li>
                <li class="">
                    
    <a class="" href="../../UnityIntegration/threading-in-unity/">Threading in Unity</a>
                </li>
                <li class="">
                    
    <a class="" href="../../UnityIntegration/main-threading-rpcs/">Main Threading RPCs</a>
                </li>
                <li class="">
                    
    <a class="" href="../../UnityIntegration/running-unity-specific-code-on-the-main-thread/">Running Unity specific code on the main thread</a>
                </li>
                <li class="">
                    
    <a class="" href="../../UnityIntegration/network-start/">Unity Integration Network Start</a>
                </li>
    </ul>
	    </li>
          
            <li class="toctree-l1">
		
    <span class="caption-text">Basic Network Samples</span>
    <ul class="subnav">
                <li class="">
                    
    <a class="" href="../../BasicNetworkSamples/server-hosting-code/">Server Hosting Code</a>
                </li>
                <li class="">
                    
    <a class="" href="../../BasicNetworkSamples/client-connecting-code/">Client Connecting Code</a>
                </li>
                <li class="">
                    
    <a class="" href="../../BasicNetworkSamples/server-disconnect-client-code/">Server Disconnect Client Code</a>
                </li>
                <li class="">
                    
    <a class="" href="../../BasicNetworkSamples/ban-client-code/">Ban Client Code</a>
                </li>
                <li class="">
                    
    <a class="" href="../../BasicNetworkSamples/send-binary-frame/">Send Binary Frame</a>
                </li>
                <li class="">
                    
    <a class="" href="../../BasicNetworkSamples/send-file/">Send File</a>
                </li>
    </ul>
	    </li>
          
            <li class="toctree-l1">
		
    <span class="caption-text">Scene Navigation</span>
    <ul class="subnav">
                <li class="">
                    
    <a class="" href="../../SceneNavigation/loading-scenes/">Loading Scenes</a>
                </li>
                <li class="">
                    
    <a class="" href="../../SceneNavigation/scene-events/">Scene Events</a>
                </li>
    </ul>
	    </li>
          
            <li class="toctree-l1">
		
    <span class="caption-text">NetWorker</span>
    <ul class="subnav">
                <li class="">
                    
    <a class="" href="../../NetWorker/temporarily-blocking-connections/">Temporarily Blocking Connections</a>
                </li>
                <li class="">
                    
    <a class="" href="../../NetWorker/thread-safe-player-iteration/">Thread Safe Player Iteration</a>
                </li>
    </ul>
	    </li>
          
            <li class="toctree-l1">
		
    <span class="caption-text">Master Server</span>
    <ul class="subnav">
                <li class="">
                    
    <a class="" href="../../MasterServer/quick-start/">Master Server Quick Start</a>
                </li>
                <li class="">
                    
    <a class="" href="../../MasterServer/connecting-to-master-server/">Connecting to Master Server</a>
                </li>
                <li class="">
                    
    <a class="" href="../../MasterServer/getting-host-list/">Getting Host List From Master Server</a>
                </li>
                <li class="">
                    
    <a class="" href="../../MasterServer/windows-server-firewall-setup/">Windows Server Firewall Setup</a>
                </li>
    </ul>
	    </li>
          
            <li class="toctree-l1">
		
    <span class="caption-text">Web Server</span>
    <ul class="subnav">
                <li class="">
                    
    <a class="" href="../../WebServer/jumpstart/">Web Server Jumpstart</a>
                </li>
                <li class="">
                    
    <a class="" href="../../WebServer/extending-with-mvc/">Web Server Extending With MVC</a>
                </li>
                <li class="">
                    
    <a class="" href="../../WebServer/command-plugins/">Web Server Command Plugins</a>
                </li>
    </ul>
	    </li>
          
            <li class="toctree-l1">
		
    <span class="caption-text">Troubleshooting</span>
    <ul class="subnav">
                <li class=" current">
                    
    <a class="current" href="./">Troubleshooting</a>
    <ul class="subnav">
            
    <li class="toctree-l3"><a href="#troubleshooting">Troubleshooting</a></li>
    
        <ul>
        
            <li><a class="toctree-l4" href="#network-issues">Network Issues</a></li>
        
        </ul>
    

    </ul>
                </li>
                <li class="">
                    
    <a class="" href="../throttling-network-internal/">Throttling Network Internal</a>
                </li>
    </ul>
	    </li>
          
            <li class="toctree-l1">
		
    <a class="" href="../../connection-cycle-events/">Events</a>
	    </li>
          
            <li class="toctree-l1">
		
    <a class="" href="../../rewinding/">Rewinding</a>
	    </li>
          
            <li class="toctree-l1">
		
    <a class="" href="../../network-logging/">Debugging</a>
	    </li>
          
            <li class="toctree-l1">
		
    <a class="" href="../../working-with-multiple-sockets/">Working With Multiple Sockets</a>
	    </li>
          
            <li class="toctree-l1">
		
    <a class="" href="../../nat-hole-punching/">NAT Hole Punching</a>
	    </li>
          
            <li class="toctree-l1">
		
    <a class="" href="../../lan-discovery/">LAN Discovery</a>
	    </li>
          
            <li class="toctree-l1">
		
    <a class="" href="../../offline-mode/">Offline Mode</a>
	    </li>
          
            <li class="toctree-l1">
		
    <a class="" href="../../lobby/">Lobby System</a>
	    </li>
          
            <li class="toctree-l1">
		
    <a class="" href="../../adding-and-updating-docs/">Contributing</a>
	    </li>
          
        </ul>
      </div>
      &nbsp;
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
        <a href="../..">Forge Networking Remastered</a>
      </nav>

      
      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="../..">Docs</a> &raquo;</li>
    
      
        
          <li>Troubleshooting &raquo;</li>
        
      
    
    <li>Troubleshooting</li>
    <li class="wy-breadcrumbs-aside">
      
    </li>
  </ul>
  <hr/>
</div>
          <div role="main">
            <div class="section">
              
                <h1 id="troubleshooting">Troubleshooting</h1>
<h2 id="network-issues">Network Issues</h2>
<p>If you are having trouble setting up your network, or you are having trouble connecting your game, please review this page and follow the steps completely. There are many stages of network communication that you can troubleshoot to test your game. In this document we will go over the various steps to troubleshooting so that you can figure out what could be wrong with the setup on your machine, local network, or internet connections.</p>
<h3 id="the-local-machine">The Local Machine</h3>
<p>The primary method of testing your game will most likely be on a single machine which is often your development machine. The addresses <code>127.0.0.1</code>, <code>localhost</code>, <code>::0</code>, etc. are all references to the machine you are currently on. These addresses are used for local testing, routing, security, and other probably less common practices.</p>
<p>Steps to test:
1. Turn on "Run in Background" in Unity Player Settings
2. Set the Multiplayer Menu scene as the first scene
3. Use the CubeForge demo scene as the second scene
4. Build your game from Unity
5. Run 1 instance of your build and play the other instance in the Unity Editor
6. Press play in the Editor
7. Host a server in the Editor on port <strong>15937</strong>
8. Run the built instance of the application
9. Connect to IP address <strong>127.0.0.1</strong> and port number <strong>15937</strong> on the built instance</p>
<p>If you can connect, <strong>CONGRATULATIONS</strong>, your game is properly networked and your machine is properly setup to test your game on the local machine. If you are having trouble with this stage, please ensure that you are properly following the steps above and building the instance.</p>
<h3 id="the-local-area-network-lan">The Local Area Network (LAN)</h3>
<p>If the local machine setup above is working correctly and your local area network (LAN) is not, chances are there is an issue with your network or machine firewall. Follow the above steps except run the instance of the game that was built on another machine on your network. We will refer to the machine that the Unity Editor (server) is on as <strong>Server</strong> and the second machine that is on the network which is running the built instance <strong>Client</strong>.</p>
<ol>
<li>Host the server on <strong>Server</strong></li>
<li>Try to connect using <strong>Client</strong></li>
</ol>
<p>If the above steps fail to connect and play the game, you have 1 or more of the following problems with your network setup.</p>
<ol>
<li>Your machine firewall on <strong>Server</strong> is not allowing the connections</li>
<li>Your machines are not on the same network</li>
<li>You are not supplying the correct IP address or Port number</li>
</ol>
<h6 id="issue-1-resolution"># Issue 1 Resolution</h6>
<p>First, let's find out if your issue is the one listed as #1. Open your firewall settings on your local machine, locate the Unity Editor in the firewall settings and make sure it is allowing connections. If you are not sure how to check or change your firewall settings, please reference Google to learn the steps for your operating system.</p>
<p><strong>NOTE</strong>: If you are not hosting in the Unity Editor, these same steps would apply to the build game, you just need to locate the game name in the firewall settings. If it is not found, you need to add the exception to your machine firewall with the same steps as mentioned above.</p>
<h6 id="issue-2-resolution"># Issue 2 Resolution</h6>
<p>For (#2) you are going to have to make sure that the two machines are on the same exact network. You can do this by making sure that the router name (when connecting) is the same for both machines (when connecting via Wi-Fi). If you are using a Ethernet cable, make sure that both cables for both machines are leading into the same router. If you are using Ethernet for one machine and Wi-Fi for another machine, make sure that the Wi-Fi connected machine is connecting to the same router name as the machine that has the Ethernet cord connected to the router.</p>
<h6 id="issue-3-resolution"># Issue 3 Resolution</h6>
<p>When connecting to <strong>Server</strong>, you are required to input the correct IP address. For the <strong>Server</strong> machine, you should be hosting on 0.0.0.0 for this test; if you are not sure what that means, then you are already set to that and do not need to worry about it as you've not set it explicitly yourself.</p>
<p>First, you need to open the network configuration on <strong>Server</strong>. You can do this by opening a <code>command prompt</code> or a <code>terminal</code> window. The following is the command that you would input onto a <code>Windows Command Prompt</code> window to find your local area networks IP address.</p>
<pre><code>ipconfig
</code></pre>

<p>The following is the command that you would input onto a <code>MacOS/Linux Terminal</code> window to find your local area networks IP address.</p>
<pre><code>ifconfig
</code></pre>

<p>Locate the LAN that you are connected to and find the IPv4 address that is assigned to the <strong>Server</strong>. This is the IP address that you need to input into your <strong>Client</strong> for the host address. The port number should still be <strong>15937</strong> as mentioned in the previous example.</p>
<p><strong>NOTE</strong>: If you use machine virtualization (VM or Virtual Machine's) then there may be multiple network IPv4 addresses when you enter the above command. This is also the case if you using both Ethernet and Wi-Fi, so please be sure to select the correct network address. Usually the name showed in the listings is indicative to the connection type.</p>
<h3 id="the-internet-cloud-servers">The Internet &amp; Cloud Servers</h3>
<p>Chances are that if the above are working perfectly, then there are one of two things that could not be working for you.</p>
<p>1) The server machine's firewall is not opened for the application. Please see <a href="#The Local Machine">the above</a> on how to fix this
or
2) The network firewall settings are not allowing the port</p>
<p>For #2 you will need to review with your cloud hosting provider on how to open the ports for your application/machine. This is done differently through each provider but should be an easy <a href="https://google.com/">Google Search</a> away from finding out. Let's say that you are hosting through Microsoft Azure, you would search Google as follows:</p>
<pre><code>Azure open network ports
</code></pre>

<p>or</p>
<pre><code>Azure open ports and endpoints
</code></pre>

<p>These queries should produce some fine results. <strong>MAKE SURE</strong> to replace "Azure" with your cloud hosting provider, like "EC2" or "Rackspace".</p>
              
            </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="../throttling-network-internal/" class="btn btn-neutral float-right" title="Throttling Network Internal">Next <span class="icon icon-circle-arrow-right"></span></a>
      
      
        <a href="../../WebServer/command-plugins/" class="btn btn-neutral" title="Web Server Command Plugins"><span class="icon icon-circle-arrow-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <!-- Copyright etc -->
    
  </div>

  Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
      
        </div>
      </div>

    </section>

  </div>

  <div class="rst-versions" role="note" style="cursor: pointer">
    <span class="rst-current-version" data-toggle="rst-current-version">
      
      
        <span><a href="../../WebServer/command-plugins/" style="color: #fcfcfc;">&laquo; Previous</a></span>
      
      
        <span style="margin-left: 15px"><a href="../throttling-network-internal/" style="color: #fcfcfc">Next &raquo;</a></span>
      
    </span>
</div>
    <script>var base_url = '../..';</script>
    <script src="../../js/theme.js" defer></script>
      <script src="../../search/main.js" defer></script>

</body>
</html>
